function getModelStr(moduleName) {
	const Name = moduleName.substr(0, 1).toUpperCase() + moduleName.substring(1);
	const api = "MUSIC_API";
	let str = `import { ${api} } from "@/api/config/servicePort";
	import http from "@/api";
	import { ResPage } from "../interface";
	
	export const get${Name} = (params: any) => {
		return http.get<ResPage<any[]>>(${api} + "/${moduleName}", params);
	};
	
	export const get${Name}ById = (id: string | number) => {
		return http.get(${api} + "/${moduleName}/" + id);
	};
	
	export const delete${Name} = (params: any) => {
		return http.delete(${api} + "/${moduleName}", params);
	};
	
	export const create${Name} = (params: any) => {
		return http.post(${api} + "/${moduleName}", params);
	};
	
	export const update${Name} = (params: any) => {
		return http.put(${api} + "/${moduleName}", params);
	};
	`;

	return str;
}

module.exports = getModelStr;
